import request from '@/utils/http'

//表格数据
export function donorsinfoList(data:any) {
    return request({
        method: 'get',
        url: '/biosample/donorsinfo/list',
        params: data
    })
}

// 新增-家系选择
export function donorsinfoAllList() {
    return request({
        method: 'get',
        url: '/biosample/familyman/AllList',
    })
}
// 新增
export function donorsinfoSave(data: any) {
    return request({
        method: 'post',
        url: '/biosample/donorsinfo/save',
        data
    })
}
// 新增-身份证
export function donorsinfoCard(card:string) {
    return request({
        method: 'get',
        url: '/biosample/donorsinfo/getByIdCard/' + card ,
    })
}

// 修改-数据显示
export function donorsinfoShow(id:number) {
    return request({
        method: 'get',
        url: `/biosample/donorsinfo/info/${id}` ,
    })
}
// 修改
export function donorsinfoUpdate(data:any) {
    return request({
        method: 'post',
        url: '/biosample/familyman/update',
        data
    })
}
// 导出
export function donorsinfoExport(key:any) {
    return request({
        method: 'get',
        url: '/biosample/donorsinfo/export-excel-donorsinfo',
        params: { key },
        responseType: "blob"
    })
}
// 删除：
export function donorsinfoDelete(data:any) {
    return request({
        method: 'post',
        url: '/biosample/donorsinfo/delete',
        data
    })
}